Information processing device, control method, and recording medium

ABSTRACT

A control method of an information processing device that communicates with a communication device includes accepting a connection processing instruction to connect the communication device with at least one external device, and performing processing to execute newly, in a case that the connection processing instruction is accepted and the communication device is not connected to any external device, the connection processing.

This application is a continuation application of U.S. patentapplication Ser. No. 15/472,808 filed on Mar. 29, 2017 and issued onMar. 29, 2017 as U.S. Pat. No. 10,116,832 and which claims the benefitof Japanese Patent Application No. 2016-072786 filed Mar. 31, 2016, bothof which are hereby incorporated by reference herein in its entirety.

BACKGROUND Field

The present disclosure relates to an information processing device, acontrol method, and a recording medium.

Description of the Related Art

With regard to a communication system where an information processingdevice such as a smartphone or the like and a communication device suchas a printer or the like perform communication, there is known aninformation processing device that performs connection processing wherean external device to which the communication device is to be connectedis decided, and the external device and the communication device areconnected. Japanese Patent Laid-Open No. 2013-219430 describes a userdevice that connects an access point and a printer in accordance withthe connection status of the user device and the access point.

Generally, in a case where a printer is already connected to an accesspoint by connection processing having been performed where the printerand access point are connected, the user device does not need to performreconnection processing. However, the device described in JapanesePatent Laid-Open No. 2013-219430 can execute connection processing toconnect the printer and access point, even though the printer and accesspoint are already connected. Accordingly, the device described inJapanese Patent Laid-Open No. 2013-219430 can unnecessarily useresources by executing connection processing.

SUMMARY

What is needed is to suppress unnecessary use of resources occurring dueto executing processing to connect an external device and communicationdevice in a case where the communication device is connected to theexternal device.

A control method of an information processing device that communicateswith a communication device includes accepting a connection processinginstruction to connect the communication device with at least oneexternal device, and performing processing to execute newly, in a casethat the connection processing instruction is accepted and thecommunication device is not connected to any external device, theconnection processing wherein a case that the connection processinginstruction is accepted and the communication device is connected to atleast one external device, the connection processing is not executednewly.

Further features will become apparent from the following description ofexemplary embodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an illustrated example of the configuration of an informationprocessing device and communication device according to an embodiment.

FIG. 2 is a diagram for describing processing of receiving broadcast ofadvertisement information and connection request information.

FIG. 3 is a diagram for describing advertisement in Bluetooth® LowEnergy.

FIGS. 4A and 4B are diagrams illustrating examples of screens relatingto a personal identification number (PIN).

FIGS. 5A and 5B are a flowchart illustrating processing that aninformation processing device according to a first embodiment executes.

FIG. 6 is a diagram illustrating an example of a screen showing a listof multiple communication devices corresponding to multiple sets ofadvertisement information received by the information processing deviceaccording to the present embodiment.

FIG. 7 is a diagram illustrating an example of a screen displayed in acase where a printing app has been activated in the informationprocessing device according to an embodiment.

FIG. 8 is a flowchart illustrating processing that the communicationdevice according to the first embodiment executes.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments will be described below with reference to thedrawings. It should be understood that one having ordinary skill in theart can make various modifications and improvements to thebelow-described embodiments without departing from the spirit and scopeof the described embodiments, and that such modifications andimprovements are seen to be applicable.

First Embodiment

Description will be made regarding the information processing device andcommunication device included in the communication system according tothe present embodiment. A smartphone will be described as an example ofthe information processing device, while a printer will be described asan example of the communication device in the present embodiment. Theinformation processing device in the present embodiment is not limitedto being a smartphone, and various devices can be applied, such as amobile terminal, laptop PC, tablet terminal, personal digital assistant(PDA), digital camera, and so forth. The communication device in thepresent embodiment is not limited to being a printer, and variousdevices that can wirelessly communicate with the information processingdevice are applicable. Examples include a photocopier, facsimile device,mobile terminal, smartphone, laptop PC, tablet terminal, PDA, digitalcamera, music player, television set, and so forth. Moreover, thecommunication device can be applied to a multifunction device thatincludes multiple functions, such as copying functions, facsimilefunctions, printing functions, and so forth.

First, the configurations of the information processing device andcommunication device according to the present embodiment will bedescribed with reference to the block diagram illustrated in FIG. 1.Although description of the present embodiment will be made by way ofthe configuration exemplified in FIG. 1, the devices are not restrictedto the functions illustrated therein.

An information processing device 101 is the information processingdevice according to the present embodiment. The information processingdevice 101 includes an input interface 102, a central processing unit(CPU) 103, read-only memory (ROM) 104, random access memory (RAM) 105,external storage 106 an output interface 107, a display unit 108, acommunication unit 109, a short-range wireless communication unit 110,and so forth. Note that these elements are connected to each other via asystem bus.

The input interface 102 is an interface that accepts data input andoperation instructions from a user via an operating unit (omitted fromillustration) such as physical keys or buttons, a touch panel, or thelike. At least part of the operating unit and the later-describeddisplay unit 108 can be integrated, so that, for example, output from ascreen and accepting operations from the user are performed on the samescreen.

The CPU 103 is a system control unit. The CPU 103 controls the overallinformation processing device 101 by executing programs, activatinghardware, and so forth. The ROM 104 stores fixed data, such as controlprograms executed by the CPU 103, data tables, embedded operating system(OS) programs, and so forth. The control programs stored in the ROM 104in the present embodiment perform software execution control such as,for example, scheduling, task switching, interrupt processing, and soforth, under the embedded OS stored in the ROM 104.

The RAM 105 is made up of static RAM (SRAM), dynamic RAM (DRAM), or thelike. The data in the RAM 105 can be kept by a primary battery for databackup, which is omitted from illustration. In this case, the RAM 105can store important data, such as program control variables and thelike, in a non-volatile manner. A memory area for storing settingsinformation of the information processing device 101 and management dataand the like of the information processing device 101 is also providedto the RAM 105. The RAM 105 is also used as a main memory and a workmemory for the CPU 103.

The external storage 106 stores applications that provide printingexecution functions, print job generating programs that generate printjobs interpretable by a communication device 151, and so forth. Theexternal storage 106 also stores various types of programs, such asinformation transmission/reception control programs fortransmission/reception with the communication device 151 connected viathe communication unit 109, and various types of information used bythese programs.

The output interface 107 is an interface that performs control so thatthe display unit 108 can display data and provide notificationsregarding the state of the information processing device 101. Thedisplay unit 108 includes light-emitting diodes (LED), a liquid crystaldisplay (LCD), or the like, and displays data and notifications of thestate of the information processing device 101. A soft keyboardincluding numeric input keys, mode setting keys, an OK key, a cancelkey, a power key, and so forth, can be provided on the display unit 108to enable user input to be accepted via the display unit 108.

The communication unit 109 is a component that connects to thecommunication device 151, an access point 131, or the like, to executedata communication. The communication unit 109 connects to an accesspoint (omitted from illustration) within the communication device 151,for example, thereby enabling communication between the informationprocessing device 101 and the communication device 151. Thecommunication unit 109 can directly communicate with the communicationdevice 151 by wireless communication, or can communicate via an externaldevice that exists outside of the information processing device 101 andthe communication device 151. The external device includes an accesspoint that exists outside of the information processing device 101 andthe communication device 151 (access point 131, etc.), and a device thatis not an access point but can relay communication.

Examples of wireless communication standard (format) include, but arenot limited to, Wireless Fidelity (Wi-Fi®) and Bluetooth®. Examples ofthe access point 131 include, but are not limited to, devices such as awireless local area network (LAN) router.

In the present embodiment, an arrangement where the informationprocessing device 101 and communication device 151 directly connectwithout going through an external access point will be referred to as“direct connection”. An arrangement where the information processingdevice 101 and communication device 151 connect via an external accesspoint will be referred to as “infrastructure connection”. Theinformation processing device 101 transmits print jobs for thecommunication device 151 to print, via the communication unit 109 in thepresent embodiment. Jobs that are transmitted are not restricted toprint jobs, an can include scan jobs for the communication device 151 toperform scans, setting commands to change settings of the communicationdevice 151, and so forth.

The short-range wireless communication unit 110 is a component thatwirelessly connects to devices, such as the communication device 151 andso forth, at close distance to perform data communication and performscommunication using a different communication standard from thecommunication unit 109. The short-range wireless communication unit 110is connectable to a short-range wireless communication unit 157 withinthe communication device 151. Bluetooth® Low Energy is used as thecommunication standard (format) for the short-range wirelesscommunication unit 110 in the present embodiment. That is, theshort-range wireless communication unit 110 includes a Bluetooth® LowEnergy unit.

The Bluetooth® Low Energy unit includes a microprocessor that processeswireless communication and a wireless communication circuit thattransmits/receives data by wireless communication. The microprocessorincludes RAM and flash memory. Accordingly, the short-range wirelesscommunication unit 110 is used to receive later-described advertisementinformation, and for Generic Attribute Profile (GATT) communication bythe short-range wireless communication unit 157. GATT is a profilegoverning reading and writing (transmission/reception) of information inthe Bluetooth® Low Energy standard. The communication standard of theshort-range wireless communication unit 110 is not restricted toBluetooth® Low Energy, and, for example, near field communication (NFC)or Wi-Fi Aware™ can be used.

The communication device 151 is the communication device according tothe present embodiment. The communication device 151 includes ROM 152,RAM 153, a CPU 154, a print engine 155, a communication unit 156, theshort-range wireless communication unit 157, and so forth.

The communication unit 156 includes an access point to connect todevices, such as the information processing device 101 and so forth, asan access point within the communication device 151. This access pointcan connect to the communication unit 109 of the information processingdevice 101. The communication unit 156 can directly communicate with theinformation processing device 101 by wireless communication, or cancommunicate via the access point 131. As previously indicated, examplesof communication standards include Wi-Fi®, Bluetooth®, and so forth. Thecommunication unit 156 can include hardware to function as an accesspoint, or can use software to function/operate as an access point.

The short-range wireless communication unit 157 is a configuration thatwirelessly connects to devices such as the information processing device101 and so forth at close distance. Bluetooth® Low Energy is used as thecommunication standard of the short-range wireless communication unit157 in the present embodiment. Accordingly, the short-range wirelesscommunication unit 157 is used to transmit later-described advertisementinformation to receive Bluetooth® Low Energy connection requests, andfor GATT communication with the short-range wireless communication unit110.

An input interface 158 is an interface that accepts data input andoperation instructions from a user via an operating unit (omitted fromillustration) such as a physical keyboard or buttons, a touch panel, orthe like. At least part of a later-described display unit 160 and theoperating unit can be integrated so that, for example, output from ascreen and accepting operations from the user are performed on the samescreen.

An output interface 159 is an interface that performs control so thatthe display unit 160 can display data and notifications regarding thestate of the communication device 151. The display unit 160 includesLEDs, an LCD, or the like, and displays data and notifications of thestate of the communication device 151. A soft keyboard including numericinput keys, mode setting keys, an OK key, a cancel key, a power key, andso forth, can be provided on the display unit 160 to enable user inputto be accepted via the display unit 160.

The RAM 153 is made up of SRAM, DRAM, or the like, that requires abackup power source. The data in the RAM 153 can be kept by a primarybattery for data backup, which is omitted from illustration. In thiscase, the RAM 153 can store important data, such as program controlvariables and the like, in a non-volatile manner. A memory area forstoring settings information of the communication device 151 andmanagement data and the like of the communication device 151 is alsoprovided to the RAM 153. The RAM 153 also is used as a main memory and awork memory for the CPU 154, to serve as a reception buffer totemporarily save print information received from the informationprocessing device 101 or the like, and to save various types ofinformation.

The ROM 152 stores fixed data, such as control programs executed by theCPU 154, data tables, OS programs, and so forth. The control programsstored in the ROM 152 in the present embodiment perform softwareexecution control such as scheduling, task switching, interruptprocessing, and so forth, under the embedded OS stored in the ROM 152.The CPU 154 is a system control unit. The CPU 154 controls the overallcommunication device 151 by executing programs, and activating hardware,and so forth.

The print engine 155 performs image formation on a recording medium,such as paper or the like, using a recording medium such, as ink or thelike, based on information saved in the RAM 153 or a print job receivedfrom the information processing device 101 or the like and outputsprinting results. The print job received from the information processingdevice 101 or the like at this time includes a large amount oftransmission data requiring high-speed communication, so reception isperformed in the present embodiment using the communication unit 156that can handle higher-speed communication than the short-range wirelesscommunication unit 157.

Memory, such as an external hard disk drive (HDD), a secure digital (SD)card, or the like, can be mounted to the communication device 151 as anoptional device. Information saved in the communication device 151 canbe saved in this memory.

The connection mode of the communication device 151 according to thepresent embodiment is set by later-described connection settingprocessing, and the communication device 151 performs communication withthe information processing device by a connection arrangement based onthe set connection mode. In the communication device according to thepresent embodiment, in a case of performing connection by infrastructurecommunication, an infrastructure connection mode is set as theconnection mode. In a case of performing connection by directconnection, a direct connection mode is set as the connection mode.

The information processing device 101 operates as a master device in thepresent embodiment and the communication device 151 operates as a slavedevice. Although an example is illustrated where the informationprocessing device 101 and communication device 151 share processing,this sharing arrangement is not seen to be limiting, and otherarrangements can be used.

Processing for transmitting advertisement information and receiving aBluetooth® Low Energy connection request in the Bluetooth® Low Energystandard will now be described. The short-range wireless communicationunit 157 operates as a slave device in the present embodiment, so theshort-range wireless communication unit 157 performs the aboveprocessing for transmitting and receiving.

The short-range wireless communication unit 157 performs communicationusing GATT communication (Bluetooth® Low Energy communication), where a2.4 GHz frequency band is divided into 40 channels (channel 0 through39). Of these, the 37th through 39th channels are used for transmissionof advertisement information and reception of Bluetooth® Low Energyconnection requests, and the 0th through 36th channels are used for datacommunication following Bluetooth® Low Energy connection.

FIG. 2 illustrates the power consumption for transmitting advertisementinformation using a single channel, broken down into processes. Thevertical axis represents the power consumption of the short-rangewireless communication unit 157 and the horizontal axis represents time.Tx205 indicates the total amount of power consumed in processing ofbroadcasting advertisement information (hereinafter referred to as“transmission processing”), and Rx206 indicates the total amount ofpower consumed in processing of keeping the receiver enabled to receiveBluetooth® Low Energy connection requests (hereinafter referred to as“reception processing”).

Transmission power 202 indicates the peak power consumption bytransmission processing. Reception power 203 indicates the peak powerconsumption by reception processing. Microprocessor operation power 201indicates the peak power consumption in a case where the microprocessorwithin the short-range wireless communication unit 157 is operating. Themicroprocessor operates before, during, and after Tx205 and Rx206because the microprocessor needs to be active beforehand in order toexecute or stop transmission/reception processing.

In a case where transmission of advertisement information is performedusing multiple channels, the power consumption increases proportionatelyto the number of channels transmitting advertisement information. In astate where the short-range wireless communication unit 157 is in apower saving mode, with the microprocessor not operating, sleep power204 is the peak power consumption of the short-range wirelesscommunication unit 157. The short-range wireless communication unit 157thus performs transmission processing using a predetermined channel, andthereafter performs reception processing for a predetermined amount oftime using the same channel, awaiting for transmission of a Bluetooth®Low Energy connection request from the information processing device101. In a case of having received a Bluetooth® Low Energy connectionrequest from the information processing device 101, the short-rangewireless communication unit 157 establishes a Bluetooth® Low Energyconnection, and performs GATT communication with the informationprocessing device 101.

The short-range wireless communication unit 157 performs advertisementinformation transmission processing and reception processing three timesfor each channel, stops the microprocessor from operating, and then goesinto a power saving state for a predetermined amount, as illustrated inFIG. 3. A combination of advertisement information transmissionprocessing and reception processing at a predetermined channel will bereferred to as an “advertisement”, hereinafter. Also, a time cycle oftransmitting advertisement information at a predetermined channel, i.e.,the time cycle from transmitting advertisement information on a certainchannel till transmitting the advertisement information on the samechannel the next time, will be referred to as an “advertising cycle”.The number of times that advertisement is repeated from theadvertisement the first time until going to the power saving state canbe any number that is less than or equal to three.

The information processing device 101 and the communication device 151in the present embodiment perform mutual authentication and pairingprocessing to realize reading and writing of data by GATT communication.GATT communication is communication where the information processingdevice 101 serves as a GATT client and the communication device 151serves as a GATT server to read and write information from theinformation processing device 101 to the communication device 151, usinga GATT-based profile. The communication device 151 is configured suchthat reading and wiring of information by GATT communication is notpermitted in a state where pairing has not been performed between theinformation processing device 101 and the communication device 151.Thus, for example, a situation can be avoided where an unpairedinformation processing device 101 and communication device 151 performcommunication, thus preventing information stored by the communicationdevice 151 unintentionally being acquired by the unpaired informationprocessing device 101.

Pairing processing will now be described in detail. First, in a casewhere a later-described printing application is activated, and aninitial screen (home screen) is displayed by the printing application onthe display unit 108, the information processing device 101 beginssearching for advertisement information including certain deviceinformation. Examples of the certain device information include auniversally unique identifier (UUID) or media access control (MAC)address or the like of a device (a printer or the like) corresponding tothe printing application.

Upon receipt of the advertisement information including the certaindevice information, the information processing device 101 transmits aBluetooth® Low Energy connection request (CONNECT_REQ) to the devicethat transmitted the advertisement information (the communication device151 in this case), and establishes a Bluetooth® Low Energy connectionbetween the devices. In a case where pairing with the communicationdevice 151 has not yet completed, the information processing device 101displays a screen on the display unit 108 prompting the user to performpairing.

In a case where the user has instructed execution of pairing, theinformation processing device 101 transmits a pairing request to thecommunication device 151 using the security manager protocol (SMP) inthe Bluetooth® Low Energy standard. Communication between the devices isperformed by SMP until pairing is complete. Upon receiving the pairingrequest, the communication device 151 displays a PIN code display screen400, as illustrated in FIG. 4A, on the display unit 160. The PIN codedisplay screen 400 displays a PIN code 401 and a cancel button 402 tocancel the pairing processing.

Upon transmission of the pairing request, a PIN code input screen 410,as illustrated in FIG. 4B, is displayed on the display unit 108. The PINcode input screen 410 displays a PIN code input region 411, an OK button413, and a cancel button 412. The PIN code input region 411 is a regionto accept input of the PIN code 401 by the user. The OK button 413 is abutton to transmit the input PIN code 401 to the communication device151, and the cancel button 412 is a button to cancel the pairingprocessing. When the OK button 413 is pressed in a state where the PINcode 401 is input to the PIN code input region 411, the informationprocessing device 101 transmits information including the input PIN code401 to the communication device 151. The information processing device101 determines whether the PIN code 401 included in the receivedinformation matches the PIN code 401 displayed in the PIN code displayscreen 400, and if determination is made that these match, permits theinformation processing device 101 to pair.

More specifically, the communication device 151 transmits a link keycreated by a predetermined method based on the PIN code 401 to theinformation processing device 101 using SMP in the Bluetooth® Low Energystandard. Thus, the link key is stored in each of a storage region thatthe information processing device 101 has (ROM 104 or the like) and astorage region that the communication device 151 has (ROM 152 or thelike). This completes pairing, and thereafter, Bluetooth® Low Energycommunication is permitted among the devices. Once the pairing iscompleted, the information processing device 101 hides the PIN codedisplay screen 400 from display, and returns to displaying the originalscreen.

After paring is complete, when the information processing device 101transmits a GATT communication request to the communication device 151,the link key saved in the storage region at the time of pairingprocessing is notified to the communication device 151. Upon receipt ofa GATT communication request, the communication device 151 compares thelink key saved in the storage region at the time of pairing processingwith the notified link key, and confirms whether the device issuing theGATT communication request is a device with which pairing has beencompleted.

In a case where confirmation has been made that the device has beenpaired with, the communication device 151 starts reading and writing ofinformation with the information processing device 101 by GATTcommunication. Accordingly, once pairing processing with thecommunication device 151 is completed, the information processing device101 can execute GATT communication with the communication device 151without the user having to input the PIN code anymore.

Although an arrangement has been described above where the user inputsthe PIN code 401 displayed in the PIN code input region 411 on the PINcode input screen 410, this arrangement is not restrictive. For example,the PIN code 401 can be fixed, i.e., the user cannot optionally change,information that is stored in the information processing device 101 atthe time of installing the later-described printing application. Thus,the PIN code 401 is provided to the communication device 151 evenwithout user input. The timing of starting the pairing processing is notrestricted to the above arrangement either, and, for example, can be atiming at which the user instructs printing via the printingapplication, or a timing before Bluetooth® Low Energy connection isperformed in a later-described connection setting processing, or thelike.

The processing of the communication device 151 to set a network state(connection setting processing) will now be described. This connectionsetting processing is processing to set the order in which thecommunication device 151 will be connected to other devices, such as theinformation processing device 101 and so forth. In the presentembodiment, in a case of connecting to other devices in theabove-described infrastructure connection, the infrastructure connectionmode is set to the communication device 151 by the connection settingprocessing. In a case of connecting to other devices in theabove-described direct connection, the direct connection mode is set tothe communication device 151 by the connection setting processing.

At least two different communication standards are used forcommunication in the connection setting processing according to thepresent embodiment. A description will be provided regarding anarrangement where the short-range wireless communication unit 110 andshort-range wireless communication unit 157 perform communication byBluetooth® Low Energy in the present embodiment. Note that in thepresent embodiment, the short-range wireless communication unit 157functions as an advertiser (or slave) that broadcasts later-describedadvertisement information, and the short-range wireless communicationunit 110 functions as a scanner (or master) that receives theadvertisement information. The communication unit 109 and communicationunit 156 communicate by wireless LAN (Wi-Fi®) in this description.

The information processing device 101 uses a predetermined applicationstored in the ROM 104 or external storage 106 or the like to performconnection setting processing. The predetermined application is anapplication that sets an access point for the communication device 151to connect to, causes the communication device 151 to print image data,document data, or the like within the information processing device 101,and so forth, and hereinafter will be referred to as a “printingapplication”. The printing application can include other functionsbesides the function of setting an access point for the communicationdevice 151 to connect to and printing functions. For example, theprinting application can include functions to scan a document set in thecommunication device 151 in a case where the communication device 151has a scanning function, functions for performing other settings of thecommunication device 151, functions for confirming the state of thecommunication device 151, and so forth.

FIG. 7 is an example of a screen displayed on the display unit 108 whenthe printing application is started. The user can use the communicationdevice's 151 functions, such as printing a desired image or performingsettings of the communication device 151, via a startup screen 700. Upondetecting that a printer setup button 703 has been pressed, theinformation processing device 101 starts connection setting processing.The communication device 151 transitions to a connection setting mode toperform connection setting processing regarding the communication device151 in the present embodiment.

The connection setting mode is a mode that the communication device 151is set to when a connection mode is to be set to the communicationdevice 151, and is set to the communication device 151 in a case wherethe user has performed a predetermined input at an operating unit thatthe communication device 151 has, or the like. Once in the connectionsetting mode, the communication device 151 starts transmission ofadvertisement information via the short-range wireless communicationunit 157. The timing at which the communication device 151 startstransmission of advertisement information is not restricted to theabove-described arrangement, and can be at a timing at which the powerof the communication device 151 is turned on, the timing at which apredetermined operation is performed to enable the Bluetooth® Low Energyfunction, or the like, for example. In this case, the connection settingprocessing is performed at the communication device 151, so there thecommunication device 151 does not need to be set to the connectionsetting mode.

FIGS. 5A and 5B is a flowchart illustrating connection settingprocessing that the information processing device 101 according to thepresent embodiment performs. The processing in the flowchart in FIGS. 5Aand 5B is realized by the CPU 103 reading out a program stored inmemory, such as the ROM 104 or the like, to the RAM 105 and executingthe program. Note that the processing illustrated in the flowchart inFIGS. 5A and 5B is started in a case where the printer setup button 703is pressed in a state where pairing between the information processingdevice 101 and communication device 151 is completed. It is also assumedthat the communication device 151 has already transitioned to theconnection setting mode at this time.

In S501, the CPU 103 detects reception of advertisement informationissued from the communication device 151, via the short-range wirelesscommunication unit 110. At this time, the CPU 103 confirms whether theadvertisement type included in the received advertisement information isADV_IND or ADV_DIRECT_IND permitting a connection request to thecommunication device 151. In a case where this type of advertisementinformation has been received, the CPU 103 deems advertisementinformation to have been received. This advertisement information can becontinuously emitted by the communication device 151, or issuing can bestarted in a case where the communication device 151 detects apredetermined user operation to enable Bluetooth® Low Energycommunication at an operating unit that the communication device 151has, or the like.

In S502, the CPU 103 transmits a Bluetooth® Low Energy connectionrequest to the communication device 151 via the short-range wirelesscommunication unit 110, establishes a Bluetooth® Low Energy connectionbetween the short-range wireless communication unit 110 andcommunication device 151, and starts GATT communication. In step S503,the CPU 103 acquires network information of the communication device 151by GATT communication via the short-range wireless communication unit110. The network information of the communication device 151 isinformation indicating whether the communication unit 156 of thecommunication device 151 is connected to an external access point andwhether the access point function within the communication device 151 isenabled (connection status information).

If the access point function within the communication device 151 isenabled, connection can be made between the access point function withinthe communication device 151 and other devices, such as the informationprocessing device 101 (connection enabled state). The networkinformation of the communication device 151 also, for example, includesinformation of the access point to which it is connected (service setidentifier (SSID), MAC address, Internet Protocol (IP) address,passwords necessary for connection, and so forth). The networkinformation of the communication device 151 can be, for example, flagsindicating whether the communication unit 156 of the communicationdevice 151 is connected to an external access point and whether theaccess point function within the communication device 151 is enabled.

In S504, the CPU 103 acquires the network information of the informationprocessing device 101. The network information of the informationprocessing device 101 includes information of the connection statusbetween the communication unit 109 that the information processingdevice 101 has and the external access point of the informationprocessing device 101. Specifically, the network information of theinformation processing device 101 includes whether the communicationunit 109 is connected to an external access point, whether thecommunication unit 109 is connected to an internal access point in thecommunication device 151, whether the communication unit 109 is notconnected to an access point, and so forth. In a case where thecommunication unit 109 is connected to any of the access points, thenetwork information of the information processing device 101 alsoincludes information of the access point to which the communication unit109 is connected (SSID, MAC address, IP address, passwords necessary forconnection, and so forth).

In S505, the CPU 103 references the network information of thecommunication device 151 acquired in S503, and determines whether theconnection mode of the communication device 151 has been set.Specifically, in a case where the communication unit 156 is connected toan external access point or other external devices, or the internalaccess point function within the communication device 151 is enabled,the CPU 103 determines that the connection mode of the communicationdevice 151 has been set.

In a case where the communication unit 156 is not connected to anexternal access point, and the internal access point function within thecommunication device 151 is not enabled, the CPU 103 determines that theconnection mode of the communication device 151 has not been set. Thereason is that if the infrastructure connection mode is set to thecommunication device 151, the communication unit 156 is connected to anexternal access point, and if the direct connection mode is set to thecommunication device 151, the internal access point function within thecommunication device 151 is enabled.

The CPU 103 can determine whether the connection mode of thecommunication device 151 is set by a different method at this time. Forexample, in a case where the communication unit 156 is connected to anexternal access point, an external device other than the informationprocessing device 101 or the communication unit 109, the CPU 103 maydetermine that the connection mode of the communication device 151 isset. In a case where the communication unit 156 is not connected to anyof these, the CPU 103 can determine that the connection mode of thecommunication device 151 is not set. The reason is that if theinfrastructure connection mode is set to the communication device 151,the communication unit 156 is connected to an external access point, andif the direct connection mode is set to the communication device 151,the communication unit 156 is connected to an external device other thanthe information processing device 101 or the communication unit 109.

In a case of the CPU 103 determining that the connection mode of thecommunication device 151 is set, the flow advances to S506. In a case ofdetermining that the connection mode of the communication device 151 isnot set, the flow advances to S508.

In S506, the CPU 103 references the network information acquired in S503and S504, and determines whether the communication unit 109 and thecommunication unit 156 can communicate. In a case where thecommunication unit 109 and the communication unit 156 are connected tothe same external access point or the communication unit 109 isconnected to the internal access point within the communication device151, the CPU 103 determines that the communication unit 109 and thecommunication unit 156 can communicate. In a case where thecommunication unit 109 and the communication unit 156 are connected todifferent external access points, the CPU 103 determines that thecommunication unit 109 and communication unit 156 cannot communicate.

In a case where the internal access point within the communicationdevice 151 is enabled, but the communication unit 109 is not connectedto this access point, the CPU 103 determines that the communication unit109 and communication unit 156 cannot communicate. In a case where theCPU 103 determines that the communication unit 109 and communicationunit 156 can communicate, the connection setting processing ends. In acase where “cannot communicate” is determined, the flow advances toS507.

In S507, the CPU 103 sets the network state so that the communicationunit 109 and communication unit 156 can communicate. In a case where thecommunication unit 156 is connected to an external access point, the CPU103 connects the communication unit 109 to the access point to which thecommunication unit 156 is connected. In a case where the internal accesspoint within the communication device 151 is enabled, the CPU 103connects the communication unit 109 to the internal access point withinthe communication device 151. In a case where connection informationnecessary for connection to the access point to which connection is tobe made is already stored in the storage region of the informationprocessing device 101, the CPU 103 uses this connection information toconnect the communication unit 109 to the access point without useroperations at this time. A case where connection information is alreadystored in the storage region of the information processing device 101is, for example, a case where the information processing device 101previously connected to this access point or a case where connectioninformation is stored in the network information received in S503.

In a case where connection information necessary for connection to theaccess point to which connection is to be made is not stored in thestorage region of the information processing device 101, the CPU 103displays a screen for accepting input of connection information on thedisplay unit 108, and accepts input of connection information from theuser. A case where connection information is not already stored in thestorage region of the information processing device 101 is, for example,a case where the information processing device 101 has never connectedto this access point before or a case where connection information isnot stored in the network information received in S503.

In a case of accepting connection information from the user, the CPU 103connects the communication unit 109 to the access point using the inputconnection information. The CPU 103 can receive connection informationof an access point to which the communication unit 156 is connected orconnection information to connect to the internal access point withinthe communication device 151 from the communication device 151 by GATTcommunication via the short-range wireless communication unit 110. Thisarrangement enables the communication unit 109 to be connected to theaccess point without accepting input from the user in a case whereconnection information necessary for connection to an access point to beconnected to is not stored in the storage region of the informationprocessing device 101 beforehand. In a case where input of connectioninformation is necessary due to OS restrictions for example, even thoughwhere connection information necessary for connection to the accesspoint to which connection is to be made is already stored in the storageregion of the information processing device 101, input of connectioninformation can be accepted from the user.

In S508, the CPU 103 references the network information acquired inS503, and determines whether the communication unit 109 is connected toan external access point. In a case where the communication unit 109 isconnected to the network via an access point, the communication unit 156connects to the same to establish an infrastructure connection betweenthe devices. The reason is that generally, while Internet communicationover wireless LAN cannot be performed with a direction connection,Internet communication over wireless LAN can be performed if the accesspoint relaying the communication is connected to the Internet byinfrastructure connection. Another reason is that the informationprocessing device 101 and communication device 151 can communicate withother devices connected to the access point used for relayingcommunication in an infrastructure connection.

In a case where the communication unit 109 is not connected to an accesspoint, there is a high possibility that there is no external accesspoint near the devices, so establishing a direct connection between thedevices is desirable. Accordingly, in a case where the CPU 103determines that the communication unit 109 is connected to an externalaccess point, the flow advances to S509 to confirm whetherinfrastructure connection can be executed between the informationprocessing device 101 and communication device 151. In a case wheredetermination is made that the communication unit 109 is not connectedto an external access point, the CPU 103 determines that a directconnection is appropriate for connection between the informationprocessing device 101 and the communication device 151, and the flowadvances to S515.

In S509, the CPU 103 requests, by GATT communication via the short-rangewireless communication unit 110, the communication device 151 for a listof external access points that the communication unit 156 can connectto. The requested list is a list of information for identifying externalaccess points that the communication unit 156 can connect to like, forexample, the information for identifying external access points beingSSIDs or the like. In S510, the CPU 103 acquires, from the communicationdevice 151 by GATT communication via the short-range wirelesscommunication unit 110, the list of external access points that thecommunication unit 156 can connect to.

In S511, the CPU 103 determines whether an external access point towhich the communication unit 109 is currently connected is included inthe list acquired from the communication device 151 in S510. That is,the CPU 103 determines whether the external access point to which thecommunication unit 109 is currently connected is an external accesspoint to which the communication unit 156 can connect. In a case ofdetermining that the external access point to which the communicationunit 109 is currently connected is included in the list, the CPU 103judges that infrastructure connection is appropriate for connection ofthe information processing device 101 and communication device 151, andthe flow advances to S512. In a case of determining that the externalaccess point to which the communication unit 109 is currently connectedis not included in the list, the CPU 103 determines that directconnection is appropriate for connection of the information processingdevice 101 and communication device 151, and the flow advances to S515.

In S512, the CPU 103 displays a screen on the display unit 108 to acceptselection of whether to use the external access point that thecommunication unit 109 currently is connected to for the infrastructureconnection between the information processing device 101 andcommunication device 151, and accepts selection from the user. The CPU103 then determines whether to use the external access point that thecommunication unit 109 is currently connected to for the infrastructureconnection between the information processing device 101 andcommunication device 151, based on the results of the acceptedselection.

In a case of the CPU 103 determining to use the external access pointthat the communication unit 109 is currently connected to for theinfrastructure connection between the information processing device 101and communication device 151, the flow advances to S514. In a case ofthe CPU 103 determining not to use the external access point that thecommunication unit 109 is currently connected to for the infrastructureconnection between the information processing device 101 andcommunication device 151, the flow advances to S513.

In S513, the CPU 103 prompts the user to select, from external accesspoints to which the communication unit 156 can connect, an access pointfor the infrastructure connection between the information processingdevice 101 and communication device 151. The CPU 103 displays a screenfor the selection based on the list acquired in S510, and acceptsselection of an access point from the user. If authentication processingsuch as inputting a password or the like is necessary for connection tothe selected access point, the CPU 103 also accepts input of thepassword from the user.

In S514, the CPU 103 transmits a command for setting the communicationdevice 151 to the infrastructure connection mode to the communicationdevice 151 by GATT communication via the short-range wirelesscommunication unit 110. In a case where the processing is performedafter the “Yes” determination in S512, the CPU 103 transmits informationof the external access point to which the communication unit 109 iscurrently connected to the communication device 151 by GATTcommunication via the short-range wireless communication unit 110. Theinformation of the external access point to which the communication unit109 is currently connected includes, for example, SSID information ofthe access point, password necessary to connect to this access point,and so forth. Connection information to connect to the external accesspoint to which the communication unit 109 is currently connected is alsostored in the storage region of the information processing device 101 atthe time of connection of the communication unit 109 to this accesspoint.

In a case where connection information to connect to the external accesspoint to which the communication unit 109 is currently connected is notstored in the storage region of the information processing device 101,the CPU 103 displays a screen on the display unit 108 for acceptinginput of the connection information. Input of the connection informationto connect to the external access point to which the communication unit109 is currently connected is accepted from the user, and the inputinformation is transmitted to the communication device 151. The CPU 103does not have to accept input of connection information even if theconnection information is not stored in the storage region of theinformation processing device 101 if the external access point to whichthe communication unit 109 currently is connected does not requirepassword authentication.

In a case where the processing is performed after S513, the CPU 103transmits information of the access point selected by the user in S513the communication device 151 by GATT communication via the short-rangewireless communication unit 110. Information of the access pointselected by the user in S513 includes, for example, the SSID of theaccess point, the password input in S513, and so forth. The processingof S514 transitions the communication device 151 to the infrastructureconnection mode.

In S515, the CPU 103 transmits a command for setting the communicationdevice 151 to the direct connection mode to the communication device 151by GATT communication via the short-range wireless communication unit110. Specifically, the CPU 103 requests the communication device 151 byGATT communication via the short-range wireless communication unit 110to enable the access point within the communication device 151. Theprocessing of S515 transitions the communication device 151 to thedirect connection mode.

In S516, the CPU 103 uses the connection information to connect to theinternal access point within the communication device 151 to connect thecommunication unit 109 to the internal access point within thecommunication device 151. In a case where the CPU 103 does not have theconnection information to connect to the internal access point withinthe communication device 151, the CPU 103 receives it from thecommunication device 151 by GATT communication via the short-rangewireless communication unit 110. In a case where the connectioninformation to connect to the internal access point within thecommunication device 151 is previously stored in the storage region ofthe information processing device 101, the CPU 103 uses it to performconnection.

An arrangement can also be made where the CPU 103 displays a screen onthe display unit 108 to accept user input of the connection informationto connect to the internal access point within the communication device151, and accept input of the connection information. A configuration canalso be made where the connection information to connect to the internalaccess point within the communication device 151 is included in thenetwork information of the communication device 151, and the CPU 103references the network information acquired in S503 to performconnection. After executing the processing in S514, the CPU 103 ends theconnection setting processing. In a case where the connection settingprocessing ends, the CPU 103 disconnects the Bluetooth® Lowe Energyconnection between the short-range wireless communication unit 110 andthe communication device 151.

After the processing in FIGS. 5A and 5B ends, and connection with thecommunication device 151 has been established by the connection form inaccordance with the connection mode that the communication device 151has been set to, the information processing device 101 can transmit jobsto the communication device 151 via the established connection. Forexample, the information processing device 101 can display a screen toselect an image to be printed on the display unit 108, and in a casewhere selection of an image and an instruction to execute printing havebeen accepted from the user, a print job is generated and transmitted tothe communication device 151 via the established connection.Accordingly, the information processing device 101 can cause thecommunication device 151 to execute printing.

FIG. 8 is a flowchart illustrating connection setting processingexecuted by the communication device 151 according to the presentembodiment. The processing illustrated in the flowchart in FIG. 8 isrealized by the CPU 154 reading out a program stored in memory, such asthe ROM 152 or the like, to the RAM 153 and executing the program.Processing illustrated in the flowchart in FIG. 8 is started upontransition to the connection setting mode in a state where pairingbetween the information processing device 101 and the communicationdevice 151 has completed.

In S801, the CPU 154 enters an advertising state, which is a state whereadvertisement information is broadcast by the short-range wirelesscommunication unit 157 every predetermined time period. The term“broadcast” refers to transmitting information over a certain range,without specifying a target of the transmission of information.

Next, in S802, the CPU 154 determines whether a Bluetooth® Low Energyconnection request has been received from the information processingdevice 101 via the short-range wireless communication unit 157. In acase where the short-range wireless communication unit 157 has receiveda Bluetooth® Low Energy connection request, the CPU 154 performs theprocessing in S804. In a case where the short-range wirelesscommunication unit 157 has not received a Bluetooth® Low Energyconnection request, the CPU 154 performs the processing in S803 todetermine whether a predetermined amount of time has elapsed afterhaving transitioned to the connection setting mode (whether timed out).In a case where the process has not timed out, the CPU 154 repeats theprocessing of S802. In a case that the process has timed out, the CPU154 ends the connection setting processing.

In S804, the CPU 154 temporarily stops transmission of advertisementinformation via the short-range wireless communication unit 157 toestablish a Bluetooth® Low Energy connection and perform GATTcommunication. The reason is that the short-range wireless communicationunit 157 cannot establish a Bluetooth® Lowe Energy connection andtransmit advertisement information at the same time. In a case where theshort-range wireless communication unit 157 can establish a Bluetooth®Low Energy connection and transmission of advertisement information atthe same time, this processing does not have to be executed. That is,the CPU 154 can continue transmission of advertisement information viathe short-range wireless communication unit 157.

In S805, the CPU 154 then establishes the Bluetooth® Low Energyconnection between the short-range wireless communication unit 157 andthe information processing device 101, and starts GATT communication viathe short-range wireless communication unit 157. In S806, the CPU 154transmits the network information of the communication device 151 to theinformation processing device 101 by GATT communication via theshort-range wireless communication unit 157. As previously described, ifan arrangement has been made where the network information of thecommunication device 151 is included in the advertisement informationemitted from the short-range wireless communication unit 157, thisprocessing is not necessary.

Next, in S807, the CPU 154 determines whether a request for a list ofexternal access points to which the communication unit 156 can connecthas been received from the information processing device 101 by GATTcommunication via the short-range wireless communication unit 157. In acase of the CPU 154 determining that a request for the list has beenreceived, the flow advances to S808. In a case it is determined that arequest for the list has not been received, the flow advances to S809.The CPU 154 can wait a predetermined amount of time between S806 andS807, taking into consideration the amount of time required for theprocessing performed by the information processing device 101.

In S808, the CPU 154 searches for external access points that thecommunication unit 156 can connect to, and generates a list of externalaccess points that the communication unit 156 can connect to. The CPU154 executes the search for external access points that thecommunication unit 156 can connect to by detecting beacons based onWi-Fi® communication using the communication unit 156. After generatingthe list, the CPU 154 transmits the generated list to the informationprocessing device 101 by GATT communication via the short-range wirelesscommunication unit 157. If a list of external access points that thecommunication unit 156 can connect to has previously been generated, theCPU 154 can transmit the already-generated list to the informationprocessing device 101 without searching for the external access pointsthat the communication unit 156 can connect to.

In S809, the CPU 154 determines whether a command for setting thecommunication device 151 to the communication mode has been receivedfrom the information processing device 101 by GATT communication via theshort-range wireless communication unit 157. In a case where it isdetermined that the command has been received, the CPU 154 performs theprocessing in S810. In a case where it is determined that the commandhas not been received, the CPU 154 performs the processing of S811 todetermine whether a predetermined amount of time has elapsed afterhaving started GATT communication (whether timed out). In a case whereit is determined that the process has not timed out, the CPU 154 repeatsthe processing in S809. In a case where it is determined that theprocess has timed out, the CPU 154 performs the processing in S812.

In S810, the CPU 154 sets the connection mode of the communicationdevice 151 based on the command that has been received. In a case wherethe received command is a command to set the communication device 151 tothe infrastructure connection mode, the CPU 154 transitions thecommunication device 151 to the infrastructure connection mode.Specifically, the CPU 154 registers the access point (access point 131in this case), indicated by the SSID stored in the received command, asthe connection target of the communication device 151. Afterregistration of the access point, the CPU 154 uses the connectioninformation stored in the command to connect the communication unit 156to the access point 131.

In a case where connection is successful, the infrastructure connectionbetween the information processing device 101 and the communicationdevice 151 via the access point 131 is established. Setting thecommunication device 151 to the infrastructure connection mode meansthat communication can also be performed with other informationprocessing devices subsequently connected to the access point 131. TheCPU 154 can notify the information processing device 101 by GATTcommunication whether connection to the access point 131 has beensuccessful. A configuration can be made where, in a case of receiving anotification from the communication device 151 that connection to theaccess point has failed, the information processing device 101re-executes the connection setting processing.

In a case where the received command is a command to set thecommunication device 151 to the direct connection mode, the CPU 154transitions the communication device 151 to the direct connection mode.Specifically, the CPU 154 sets the internal access point function withinthe communication device 151 to be enabled, so as to be in a state wherethe information processing device 101 can connect to the internal accesspoint within the communication device 151. In a case where a connectionrequest to the internal access point within the communication device 151is accepted from the information processing device 101, the CPU 154permits this, and the information processing device 101 is thus in acommunicable state via the communication unit 156. Setting thecommunication device 151 to the direct connection mode enables theinternal access point within the communication device 151, so even afterthe connection with the information processing device 101 is disengaged,communication can be performed with other devices by performing a directconnection with those devices.

While an arrangement has been described where the internal access pointwithin the communication device 151 is enabled in a case where thedirect connection mode is set, this is not restrictive. For example, ina case of transmitting the communication device 151 to the directconnection mode, the CPU 154 can execute sequence control to performconnection by Wi-Fi Direct®. In this case, the CPU 154 performsnegotiation with the information processing device 101, and determinesto enable the internal access point within the communication device 151or to connect the communication unit 156 to the internal access pointwithin the information processing device 101, based on the results ofthe negotiation. In a case of deciding to enable the internal accesspoint within the communication device 151, this access point is enabled,and connection between this access point and the communication unit 109is established. In a case of deciding to connect the communication unit156 to the internal access point within the information processingdevice 101, connection between this access point and the communicationunit 156 is established.

In S812, the CPU 154 disengages the Bluetooth® Low Energy connectionbetween the short-range wireless communication unit 157 and theinformation processing device 101, and ends GATT communication. Theshort-range wireless communication unit 157 resumes transmission ofadvertisement information in a case where the Bluetooth® Low Energyconnection is disengaged.

According to this arrangement, the information processing device 101 canset the connection mode of the communication device 151, and can connectto the communication device 151 by the connection form in accordancewith the connection mode that has been set.

Also, in the present embodiment, in a case where the connection mode ofthe communication device 151 has been set, the information processingdevice 101 connects with the communication device 151 by a connectionform in accordance with the already-set connection mode, rather thansetting the connection mode of the communication device 151. Theinformation processing device 101 automatically decides whether toperform settings of the connection mode of the communication device 151based on network information acquired from the communication device 151.Accordingly, in a case where the connection mode of the communicationdevice 151 has been set, the information processing device 101 can omitthe setting processing of the connection mode of the communicationdevice 151, thereby reducing the load on the information processingdevice 101. This can also suppress a situation where another informationprocessing device, which previously set the connection mode, cannotcommunicate with the communication device 151 due to the connection modeof the communication device 151 being changed.

There can also be usage cases where the user wants to change theconnection mode of the communication device 151 due to, for example, anew external access point having been installed in the networkenvironment of the communication device 151, or the like. Accordingly,the communication device 151 can have an initialization function forresetting the connection mode that is set to return to the state whereno connection mode is set. The user can change the connection mode ofthe communication device 151 to that corresponding to a new networkenvironment after executing the initialization function, and then theabove-described connection mode setting processing.

The details of connection setting processing are not restricted to theforms described above. For example, in S501, the CPU 103 is described asreceiving advertisement information in a case of receiving anadvertisement of a type where a connection request to the communicationdevice 151 is permitted, but this is not restrictive. For example, inS501 the CPU 103 can confirm detailed data contained in advertisementinformation other than the advertisement type. Specifically, in a casewhere information is included in the received advertisement informationthat the network status of the communication device 151 is not set, theCPU 103 can advance to S502. In this case, the CPU 103 does not have todeem the advertisement information as having been received in a casewhere the received advertisement information does not includeinformation that the network status of the communication device 151 isnot set.

There are also cases where the information processing device 101receives advertisement information from multiple communication devices.In these cases, the CPU 103 detects reception of multiple sets ofadvertisement information that match the above conditions in S501. TheCPU 103 can then display a screen illustrating a list of multiplecommunication devices corresponding to the multiple sets ofadvertisement information that have been received, such as illustratedin FIG. 6, after S501, and have the user select the communication devicethat the communication setting processing is to be performed on.

FIG. 6 illustrates an example of a screen displayed in a case whereadvertisement information has been received from three communicationdevices. In the screen illustrated in FIG. 6, the device names of eachof the communication devices, and the device addresses (BD_ADDR) of theshort-range wireless communication units that the communication deviceseach have, are shown so that the user can identify the communicationdevices. This information is included in the advertisement informationtransmitted from the respective communication devices.

The CPU 103 has been described as acquiring network information of thecommunication device 151 in S503 by GATT communication with thecommunication device 151, but this is not restrictive. For example, anarrangement can be made where the network information of thecommunication device 151 is included in the advertisement informationtransmitted by the communication device 151, with the receivedadvertisement information being referenced in the processing ofreferencing the network information of the communication device 151. Inthis case, the processing of S503 becomes unnecessary.

The CPU 103 has also been described in S509 and S510 as acquiring a listof external access points which the communication device 151 can connectto from the communication device 151, while GATT communication betweenthe information processing device 101 and the communication device 151remains established, but this is not restrictive. For example, in S509the CPU 103 can temporarily release the Bluetooth® Low Energy connectionafter having requested the communication device 151 for a list ofexternal access points that the communication unit 156 can connect to.In this case, after releasing the Bluetooth® Low Energy connection, theCPU 103 waits to receive advertisement information via the short-rangewireless communication unit 110, including information indicating thatgenerating of the list of external access points that the communicationunit 156 can connect to, has been completed.

In a case where the advertisement information is received via theshort-range wireless communication unit 110, the CPU 103 re-establishesthe Bluetooth® Low Energy connection, and acquires the list of externalaccess points that the communication unit 156 can connect to by GATTcommunication via the short-range wireless communication unit 110. Thisis to secure as much time as possible for devices other than theinformation processing device 101 to be able to receive theadvertisement information transmitted from the short-range wirelesscommunication unit 157.

In a case of having received a request for the list of external accesspoints that the communication unit 156 can connect to, the communicationdevice 151 starts to generate the list, but there are cases wheregenerating this list takes time to complete. The short-range wirelesscommunication unit 157 cannot transmit advertisement information whilethe Bluetooth® Low Energy connection is established. So, in the statewhere the Bluetooth® Low Energy connection is established, devices otherthan the information processing device 101 cannot receive advertisementinformation transmitted by the short-range wireless communication unit157 as long as the communication device 151 is generating the list ofexternal access points the communication unit 156 can connect to.Accordingly, temporarily releasing the Bluetooth® Low Energy connection,as described above, enables devices other than the informationprocessing device 101 to receive the advertisement information beingtransmitted by the short-range wireless communication unit 157 while thecommunication device 151 is generating the list of external accesspoints.

An arrangement can also be made where the short-range wirelesscommunication unit 157 stops advertising while the communication device151 is generating the list of external access points, even though theBluetooth® Low Energy connection is released. According to thisarrangement, devices other than the information processing device 101cannot receive the advertisement information transmitted from theshort-range wireless communication unit 157, but electric power consumedby the short-range wireless communication unit 157 can be reduced.

In a case where determination is made in the determination in S511 thatthe external access point to which the communication unit 109 iscurrently connected is not included in the list, the CPU 103 sets thecommunication device 151 to the direct connection mode, but this is notrestrictive. For example, even in a case where determination is madethat the external access point to which the communication unit 109 iscurrently connected is not included in the list, the CPU 103 can set theinfrastructure connection mode. In this case, if determination is madethat the external access point to which the communication unit 109 iscurrently connected is not included in the list, the CPU 103 displays alist of external access points to which the communication unit 156 canconnect on the display unit 108 for the user to select one from thelist.

The CPU 103 then transmits information of the external access pointselected by the user to the communication device 151 by GATTcommunication via the short-range wireless communication unit 110, as acommand for setting the communication device 151 to the infrastructureconnection mode. The CPU 103 can display on the display unit 108 ascreen for accepting input of connection information for connecting tothe external access point that the user has selected to accept input ofconnection information from the user. In this case, the CPU 103 storesthe connection information that has been input, and transmits a commandto set the communication device 151 to the infrastructure connectionmode. Thereafter, the CPU 103 switches the connection destination of thecommunication unit 109 to the external access point that the user hasselected.

The CPU 103 can use the connection information input as described aboveat this time. This enables the CPU 103 to set the communication device151 to the infrastructure connection mode, while also communicating withthe communication device 151 via the communication unit 109.

In a case where determination is made that the external access point towhich the communication unit 109 is currently connected is not includedin the list, the CPU 103 can enable the user to select which of theinfrastructure connection mode and the direct connection mode to set. Inthis case, the CPU 103 displays on the display unit 108 a list ofexternal access points to which the communication unit 156 can connect,and a button for setting the direct connection mode.

In a case where the user selects one of the access points from the list,the CPU 103 sets the communication device 151 to the infrastructureconnection mode where connection is performed via the selected accesspoint. In a case where the button for setting the direct connection modeis selected, the CPU 103 sets the communication device 151 to the directconnection mode.

Setting processing regarding the connection destination of thecommunication unit 109 is performed using communication by theshort-range wireless communication unit 110 in the present embodiment.Accordingly, the information processing device 101 can perform settingprocessing regarding the connection destination of the communicationunit 109 without changing the connection destination of thecommunication unit 109.

While a description has been provided regarding an arrangement in theabove-described embodiment where the information processing device 101connects to an internal access point within the communication device 151for direct connection, this is not restrictive. An arrangement can bemade where the communication device 151 connects to an internal accesspoint within the information processing device 101. In this case, theinformation processing device 101 transmits connection settinginformation containing the SSID and password for the internal accesspoint within the information processing device 101 to the communicationdevice 151 by GATT communication via the short-range wirelesscommunication unit 110. The communication device 151 uses the SSID andpassword for the internal access point within the information processingdevice 101 contained in the connection setting information that has beenreceived to connect the communication unit 156 and the internal accesspoint within the information processing device 101.

While a description has been provided regarding an arrangement in theabove-described embodiment where the two types of connection modes,infrastructure connection mode and direct connection mode, can be set bythe connection setting processing, this is not restrictive. For example,the present embodiment can be applied to a device that is capable ofjust setting one of the infrastructure connection mode and directconnection mode. In this case, it is sufficient for the CPU 103 todetermine in S505 whether the communication device 151 has been set to asettable connection mode. More specifically, if the settable connectionmode is the direct connection mode, it is sufficient for the CPU 103 todetermine whether the internal access point function within thecommunication device 151 is enabled and whether the communication unit156 is connected to an external device other than the informationprocessing device 101, or the communication unit 109.

If the settable connection mode is the infrastructure connection mode,it is sufficient for the CPU 103 to determine whether the communicationunit 156 is connected to an external access point. In a case where it isdetermined in S505 that the connection mode of the communication device151 has not been set, the CPU 103 performs processing to set thecommunication device 151 to a settable connection mode, regardless ofthe connection form of the communication unit 109. More specifically, ina case where the settable connection mode is the direct connection mode,following determination that the connection mode of the communicationdevice 151 has not been set in S505, the CPU 103 skips the processing inS508, and performs the processing of S515 and thereafter. In a casewhere the settable connection mode is the infrastructure connectionmode, following a determination in S505 that the connection mode of thecommunication device 151 has not been set, the CPU 103 skips theprocessing in S508, and performs the processing of S509 and thereafter.

While a description has been provided regarding an arrangement in theabove-described embodiment where the connection mode that thecommunication device 151 is set to is decided in accordance with whetherthe communication unit 109 is connected to an external access point andwhether the communication device 151 is capable of connecting to theaccess point to which the communication unit 109 is connected, this isnot restrictive. For example, an arrangement can be made where one modethat a user selects from multiple types of connection modes issingularly set. In this case, following determination that theconnection mode of the communication device 151 has not been set inS505, the CPU 103 performs processing to move the state of thecommunication device 151 to the connection mode selected by the user,regardless of the connection form of the communication unit 109.

More specifically, in a case where the connection mode selected by theuser is the direct connection mode, following a determination in S505that the connection mode of the communication device 151 has not beenset, the CPU 103 skips the processing in S508, and performs theprocessing of S515 and thereafter. In a case where the connection modeselected by the user is the infrastructure connection mode, following adetermination in S505 that the connection mode of the communicationdevice 151 has not been set, the CPU 103 skips the processing in S508,and performs the processing of S509 and thereafter.

In a case where advertisement information has been received in S501, forexample, the CPU 103 can reference device information contained in thereceived advertisement information and determine whether the device thattransmitted the advertisement information that has been received is aregistered device. A registered device is a device registered by theinformation processing device 101 as a device that performscommunication using the printing application.

In a case of registering a device, the CPU 103 saves device informationof the device being registered in a memory such as the ROM 104 or thelike. The CPU 103 determines whether the device that transmitted thereceived advertisement information is a registered device by comparingthe saved information with the device information contained in thereceived advertisement information.

In a case where the CPU 103 determines that the device that transmittedthe received advertisement information is a registered device, theprocessing of S506 and thereafter is performed. The reason is theconnection mode has most likely previously been set to the registereddevice since the device needs to be connected to the informationprocessing device 101 in order for device registration to be performed.Accordingly, in a case where the device that transmitted the receivedadvertisement information is a registered device, the CPU 103 can omitthe processing of establishing a Bluetooth® Low Energy connection andthe processing of executing GATT communication.

In a case where the result of determination in S506 is No, the CPU 103establishes the Bluetooth® Low Energy connection and acquires thenetwork status of the communication device 151. In a case where the CPU103 determines that the device that transmitted the receivedadvertisement information is not a registered device, the processing ofS502 and thereafter is performed.

Other Embodiments

Embodiments can also be realized by supplying a program that realizesone or more functions of the above-described embodiment(s) to a systemor device via a network or storage medium, and one or more processors ina computer of the system or device reading out and executing theprogram. Embodiments can also be realized by a circuit that realizes oneor more functions (e.g., an application specific integrated circuit(ASIC)).

In a case where a communication device is connected to an externaldevice, waste of resources due to connection processing where connectionof the external device and communication device is re-executed can besuppressed.

Embodiment(s) can also be realized by a computer of a system orapparatus that reads out and executes computer executable instructions(e.g., one or more programs) recorded on a storage medium (which mayalso be referred to more fully as a ‘non-transitory computer-readablestorage medium’) to perform the functions of one or more of theabove-described embodiment(s) and/or that includes one or more circuits(e.g., application specific integrated circuit (ASIC)) for performingthe functions of one or more of the above-described embodiment(s), andby a method performed by the computer of the system or apparatus by, forexample, reading out and executing the computer executable instructionsfrom the storage medium to perform the functions of one or more of theabove-described embodiment(s) and/or controlling the one or morecircuits to perform the functions of one or more of the above-describedembodiment(s). The computer may comprise one or more processors (e.g.,central processing unit (CPU), micro processing unit (MPU)) and mayinclude a network of separate computers or separate processors to readout and execute the computer executable instructions. The computerexecutable instructions may be provided to the computer, for example,from a network or the storage medium. The storage medium may include,for example, one or more of a hard disk, a random-access memory (RAM), aread only memory (ROM), a storage of distributed computing systems, anoptical disk (such as a compact disc (CD), digital versatile disc (DVD),or Blu-ray Disc (BD)™), a flash memory device, a memory card, and thelike. While exemplary embodiments have been described, it is to beunderstood that the invention is not limited to the disclosed exemplaryembodiments. The scope of the following claims is to be accorded thebroadest interpretation so as to encompass all such modifications andequivalent structures and functions.

What is claimed is:
 1. A control method of an information processingdevice that communicates with a communication device and includes atleast one processor configured to execute the control method, the methodcomprising: accepting a predetermined instruction based on a useroperation to the information processing device; executing, based on thepredetermined instruction, predetermined control that displays a screenfor causing the communication device to be a communication partner ofthe information processing device and transmission processing forwirelessly transmitting, to the communication device operating as aslave device by a first communication standard, information about anexternal device, and communicating with the communication device via theexternal device in a case where the predetermined instruction isaccepted in a state that the communication device is not connected tothe external device by a second communication standard; not executingthe predetermined control and communicating with the communicationdevice via the external device outside the communication device andoutside the information processing device, in a case where thepredetermined instruction is accepted in a state that the informationprocessing device and the communication device are connected to theexternal device by the second communication standard, and wherein thecommunication device connects to the external device by the secondcommunication standard based on the information about the externaldevice.
 2. The control method according to claim 1, wherein, in thetransmission processing, the information about the external device towhich the information processing device is connected is transmitted. 3.The control method according to claim 1, further comprising: acquiring alist of the external devices to which the communication device canconnect from the communication device by the first communicationstandard, wherein information about the external device included in theacquired list is transmitted in the transmission processing.
 4. Thecontrol method according to claim 1, wherein the first communicationstandard is Bluetooth® Low Energy, and wherein the second communicationstandard is Wi-Fi®.
 5. The control method according to claim 1, whereinthe predetermined control is not executed and the communication devicedirectly communicates with the information processing device and not viathe external device, in a case where the predetermined instruction isaccepted, in a state that the communication device directly connectswith the information processing device by the second communicationstandard and not via the external device.
 6. The control methodaccording to claim 1, wherein the information about the external deviceincludes information concerning at least one of an SSID and a passwordfor connection with the external device.
 7. The control method accordingto claim 1, further comprising: accepting input of the password forconnection with the external device from a user, wherein, theinformation about the external device includes information concerningthe password.
 8. The control method according to claim 1, wherein thefirst communication standard is Bluetooth®.
 9. The control methodaccording to claim 1, wherein the communication device is a printer. 10.The control method according to claim 1, wherein the external device isan external access point.
 11. The control method according to claim 1,wherein the communicating with the communication device via the externaldevice is executed by the second communication standard.
 12. The controlmethod according to claim 1, wherein the screen for causing thecommunication device to be a communication partner of the informationprocessing device is a screen for accepting input of the informationabout the external device.
 13. The control method according to claim 12,wherein the screen for causing the communication device to be acommunication partner of the information processing device is a screenfor accepting selection of the external device to which thecommunication device is to be connected by the transmission processing.14. The control method according to claim 1, further comprising:receiving information concerning the communication device based on thepredetermined instruction is accepted; and determining, based on theinformation concerning the communication device, whether thecommunication device is connected to the external device by the secondcommunication standard, wherein the predetermined control is notexecuted and the communicating with the communication device via theexternal device is executed in a case that it is determined that thecommunication device is connected to the external device by the secondcommunication standard, the predetermined control and the communicatingwith the communication device via the external device is executed in acase that it is determined that the communication device is notconnected to the external device by the second communication standard.15. The control method according to claim 14, wherein the informationconcerning the communication device is received by the firstcommunication standard.
 16. The control method according to claim 1,wherein a print job for causing the communication device to print istransmitted by the communicating with the communication device via theexternal device.
 17. The control method according to claim 1, whereinthe communication device is a printer.
 18. The control method accordingto claim 1, wherein the communication device is a music player.
 19. Acontrol method of an information processing device that communicateswith a communication device and includes at least one processorconfigured to execute the control method, the method comprising:accepting a predetermined instruction based on a user operation to theinformation processing device; executing, based on the predeterminedinstruction, predetermined control that includes display a screen fortransmission processing for wirelessly transmitting, to thecommunication device operating as a slave apparatus by a firstcommunication standard, information about an external device outside thecommunication device and outside the information processing device, andthe transmission processing, and communicating with the communicationdevice via the external device, in a case where the predeterminedinstruction is accepted in a state that the communication device is notconnected to the external device by a second communication standard; notexecuting the predetermined control and communicating with thecommunication device via the external device, in a case where thepredetermined instruction is accepted in a state that the informationprocessing device and the communication device are connected to theexternal device by the second communication standard, and wherein thecommunication device connects to the external device by the secondcommunication standard based on the information about the externaldevice.
 20. The control method according to claim 19, wherein, in thetransmission processing, the information about the external device towhich the information processing device is connected is transmitted. 21.The control method according to claim 19, further comprising: acquiringa list of the external devices to which the communication device canconnect from the communication device by the first communicationstandard, wherein information about the external device included in theacquired list is transmitted in the transmission processing.
 22. Thecontrol method according to claim 19, wherein the first communicationstandard is Bluetooth® Low Energy, and wherein the second communicationstandard is Wi-Fi®.
 23. The control method according to claim 19,wherein the predetermined control is not executed and the communicationdevice directly communicates with the information processing device andnot via the external device, in a case where the predeterminedinstruction is accepted, in a state that the communication devicedirectly connects with the information processing device by the secondcommunication standard and not via the external device.
 24. The controlmethod according to claim 19, wherein the information about the externaldevice includes information concerning at least one of an SSID and apassword for connection with the external device.
 25. The control methodaccording to claim 19, further comprising: accepting input of thepassword for connection with the external device from a user, wherein,the information about the external device includes informationconcerning the password.
 26. The control method according to claim 19,wherein the first communication standard is Bluetooth®.
 27. The controlmethod according to claim 19, wherein the communication device is aprinter.
 28. The control method according to claim 19, wherein theexternal device is an external access point.
 29. The control methodaccording to claim 19, wherein the communicating with the communicationdevice via the external device is executed by the second communicationstandard.
 30. The control method according to claim 19, wherein thescreen for the transmission processing is a screen for accepting inputof the information about the external device.
 31. The control methodaccording to claim 30, wherein the screen for the transmissionprocessing is a screen for accepting selection of the external device towhich the communication device is to be connected by the transmissionprocessing.
 32. The control method according to claim 19, furthercomprising: receiving information concerning the communication devicebased on the predetermined instruction is accepted; and determining,based on the information concerning the communication device, whetherthe communication device is connected to the external device by thesecond communication standard, wherein the predetermined control is notexecuted and the communicating with the communication device via theexternal device is executed in a case that it is determined that thecommunication device is connected to the external device by the secondcommunication standard, the predetermined control and the communicatingwith the communication device via the external device is executed in acase that it is determined that the communication device is notconnected to the external device by the second communication standard.33. The control method according to claim 32, wherein the informationconcerning the communication device is received by the firstcommunication standard.
 34. The control method according to claim 19,wherein a print job for causing the communication device to print istransmitted by the communicating with the communication device via theexternal device.
 35. The control method according to claim 19, whereinthe communication device is a printer.
 36. The control method accordingto claim 19, wherein the communication device is a music player.
 37. Aninformation processing device that communicates with a communicationdevice and includes at least one processor configured to execute thecontrol method, the method comprising: accepting a predeterminedinstruction based on a user operation to the information processingdevice; executing, based on the predetermined instruction, thepredetermined control that includes displaying a screen for causing thecommunication device to be a communication partner of the informationprocessing device and transmission processing for transmittingwirelessly, to the communication device operating as a slave apparatusby a first communication standard, information about the externaldevice, and communicating with the communication device via the externaldevice, in a case where the predetermined instruction is accepted in astate that the communication device is not connected to the externaldevice by a second communication standard, and not executing thepredetermined control and communicating with the communication devicevia an external device outside the communication device and outside theinformation processing device in a case where the predeterminedinstruction is accepted in a state that the information processingdevice and the communication device are connected to the external deviceby the second communication standard, and wherein the communicationdevice connects to the external device by the second communicationstandard based on the information about the external device.
 38. Theinformation processing device according to claim 37, wherein the firstcommunication standard is Bluetooth®, and wherein the secondcommunication standard is Wi-Fi®.